import { defineStore } from "pinia";
import type { ReportDataModel } from "@/api/data/model";
import { reportDataApi } from "@/api/data";

interface DataStoreType {
  reportData: ReportDataModel;
}
export const useDataStore = defineStore("data", {
  state: (): DataStoreType => {
    return {
      reportData: {},
    };
  },
  actions: {
    async getData() {
      const result = await reportDataApi();
      // console.log(result);
      this.reportData = result;
    },
  },
  getters: {},
});
